package com.example.tv;

import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import androidx.appcompat.app.AppCompatActivity;

import com.tencent.smtt.sdk.WebChromeClient;
import com.tencent.smtt.sdk.WebSettings;
import com.tencent.smtt.sdk.WebView;
import com.tencent.smtt.sdk.WebViewClient;

public class FActivity extends AppCompatActivity {

    String mUri = "http://data.qdwanglai.com/";
//    String mUri = "https://www.baidu.com/";
    //    String mUri = "http://debugx5.qq.com";

    private Button btnGo;
    private Button btnNh;
    private EditText editText;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_f);

        btnGo = findViewById(R.id.btn_go);
        btnNh = findViewById(R.id.btn_nh);
        editText = findViewById(R.id.et);
        editText.setText(mUri);

        mUri = editText.getText().toString();

        btnGo.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Intent intent = new Intent(FActivity.this, MainActivity.class);
                intent.putExtra("URL", mUri);
                startActivity(intent);
            }
        });


        btnNh.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Intent intent = new Intent(FActivity.this, MainActivity.class);
                intent.putExtra("URL", "https://debugtbs.qq.com");
                startActivity(intent);
            }
        });
    }

}
